<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div:not(#app){
      padding: 100px;
     
    }
    #div1{
      background:rgb(136, 114, 79);
    }
   #div2{
      background:rgb(49, 94, 100);
    }
    #div3{
      background:rgb(194, 136, 69);
    }
  </style>
</head>
<body>
  <div id="app">
    <div id="div1" @click="fn1">
      <div id="div2" @click.capture="fn2">
        <div id="div3" @click="fn3"></div>
      </div>
    </div>
  </div>
  <script src="./vue.js"></script>
  <script>
    
    const vm = new Vue({
      el: "#app",
      methods:{
        fn1(){
          alert(1)
        },
        fn2(e){
          alert(2);
          // e.stopPropagation();
        },
        fn3(e){
          alert(3)
          // e.stopPropagation();
        }
      }
    })
    /*

    function fn(ev){
      var e = ev||event;
      xxxx
    } 
    btn.onclick = fn;
    btn.onclick = function(){
      fn()
    }
     */
  </script>
</body>
</html>
